The present invention relates to improvements in processing of expressions that provide efficient handling of message selection filters in a messaging network.
Message oriented middleware (MOM) is commonly used to transfer data between application programs that may be running on remote data processing systems in a distributed, heterogeneous network. The middleware can shield the application programs from much of the complexity of the routing and format transformations that are required for a successful data transfer, while implementing recovery features and other reliability features.
One well established messaging model is asynchronous point-to-point messaging, in which messages are initially placed by a sender application onto a queue managed by a message handling program that is local to the sender. The message is then transferred across the network by interoperating message handling programs using information within the message header, and finally placed onto an input queue of the target application. The target application retrieves the message when it is ready to process it. An advantage of point-to-point messaging is the non-blocking nature of asynchronous communications. Both the sender and receiver can work on other tasks while the message transfer takes place. The receiver is not required to be available when the sender sends the message and the sender is not required to be available when the target receiver receives the message.
Another well established messaging model is publish/subscribe, in which a published message can be sent to multiple subscribers that have registered their interest in receiving publications such as the particular message. If publishers send their publications to a publish/subscribe message broker, and subscribers register their requirements with the broker (typically specifying topics of interest that the broker can compare with topic information in published message headers), the publishers and subscribers do not need to identify each other. Some publish/subscribe message brokers are used in association with underlying message queues.
Many commercially available MOM products implement the Java Message Service (JMS). JMS is a Java specification (developed under the Java Community Process defined by Sun Microsystems Inc.) defining an API for use in sending messages between MOM clients. JMS permits message selection by filtering on message properties and message header information. JMS allows great flexibility in the setting of headers and filters, so JMS message handlers need to be able to support this flexibility. Because of this requirement to be able to handle custom message header fields and filters, it has not been possible in a JMS environment to prepare and save filter expressions in an optimized format. Partly for this reason, typical JMS implementations are not optimized for high performance and, in particular, the tasks of parsing and preparing new filter expressions have a negative impact on performance. (Java is a registered trademark of Sun Microsystems, Inc.)
The typical process implemented for message filtering can be divided into a number of steps including:
1. parsing the filters to extract information which is useful for message filtering;
2. preparing the filters for an efficient filter evaluation (for example, transforming them from an SQL-like syntax to a new format);
3. parsing message headers and message properties of received messages; and
4. comparing the message headers/properties of the received messages with the filters to identify matching messages (referred to as evaluating the filter expressions).